package com.hspedu.homework.homework05;

/**
 * @Author Stringzhua
 * @Date 2024/3/3 17:38
 * description:老师类
 */
public class Teacher extends Employee {
    //特有属性
    private int classDays;//一年上课次数
    private double classSal;//课时费

    //重写printSal方法


    @Override
    public void printSal() {//不能使用super.printSal()方法
        System.out.println("老师  " + getName() + "  的年工资是" +
                (getSal() * getSalMonth() + classDays * classSal));
    }

    public Teacher(String name, double sal) {
        super(name, sal);
    }

    public int getClassDays() {
        return classDays;
    }

    public void setClassDays(int classDays) {
        this.classDays = classDays;
    }

    public double getClassSal() {
        return classSal;
    }

    public void setClassSal(double classSal) {
        this.classSal = classSal;
    }
}
